package com.glorysoft.xztpda.bindingadapter

import android.text.Editable
import android.text.TextWatcher
import android.view.View
import android.widget.EditText
import android.widget.TextView
import androidx.databinding.BindingAdapter
import com.glorysoft.xztpda.entity.ChangeShiftEntity
import com.glorysoft.xztpda.entity.EdcDataEDCSETLISTEDCSETBINLINELIST
import java.lang.NumberFormatException
import java.text.NumberFormat

/**
 * FileName: NumEditextAdapter
 * Author: XJH
 * Date: 2022/4/28 18:34
 * Description:
 * History:
 */
object Shift2EditextAdapter {

    @BindingAdapter(value = ["StepDisplay2"], requireAll = false)
    @JvmStatic
    fun setStepDisplay(editText: EditText, item: ChangeShiftEntity) {
        editText.visibility =
            if (item.steP_NAME == "A0100" || item.steP_NAME == "A0110" || item.steP_NAME == "A0120" || item.steP_NAME == "A0130"
                || item.steP_NAME == "A0140"
            ) View.VISIBLE else View.GONE
    }
}